package com.hhkj.admin.student.controller;

import com.hhkj.admin.student.domain.StudentCourse;
import com.hhkj.admin.student.model.req.StudentCourseReq;
import com.hhkj.admin.student.model.res.StudentCourseRes;
import com.hhkj.admin.student.service.biz.StudentCourseBizService;
import com.ruoyi.common.annotation.PermissionPrefix;
import com.ruoyi.common.base.biz.controller.v2.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 学员课程信息关联Controller
 *
 * @author ruoyi
 * @since 2023-05-17
 */
@RestController
@RequestMapping("/student/course")
@PermissionPrefix(value = PermissionPrefix.NO_PERMISSION)
public class StudentCourseController
        extends BaseController<StudentCourse, StudentCourseReq, StudentCourseRes, StudentCourseBizService> {

    /** 跟新学员状态 */
    @PutMapping("/status")
    public AjaxResult updateStatus(@RequestBody StudentCourseReq req) {
        return getBizService().updateStatus(req) ? AjaxResult.success() : AjaxResult.error();
    }
}
